GRADE 10 ICT · UNIT 3

Data Representation
in Computer Systems

Number systems, conversions, storage units & coding systems — with interactive tools to practice.

1000001 · 0110010 · 1100001 · 0100011 · 1010100 · 0111001
📐 The Four Number Systems
Computers use these four number systems to represent all kinds of data internally.
2

Binary

The language of computers. Represents voltage states: 0 = OFF, 1 = ON.

Digits: 0, 1
8

Octal

Shorthand for binary. Each octal digit = exactly 3 binary bits.

Digits: 0–7
10

Decimal

The everyday number system humans use since childhood.

Digits: 0–9
16

Hexadecimal

Compact binary. Each hex digit = exactly 4 binary bits.

Digits: 0–9, A–F

⚖️ Positional Value (Weighting Factors)

Each digit's value depends on its position. Example: decimal 325 = (3×10²) + (2×10¹) + (5×10⁰)

BINARY (base 2)

2⁷ 128
2⁶ 64
2⁵ 32
2⁴ 16
8
4
2
2⁰ 1

HEX (base 16)

16⁴ 65536
16³ 4096
16² 256
16¹ 16
16⁰ 1

🔗 Relationship Table: Dec ↔ Bin ↔ Oct ↔ Hex

DecimalBinaryOctalHexadecimal
🔄 Interactive Number Converter
Enter any number and see step-by-step conversion to all number systems.

Convert a Number

Binary
Octal
Decimal
Hexadecimal

(input) marks your source base — step cards below show the 3 outbound conversions.

— → —

Select a base and enter a number.

Enter a number above…

— → —

Select a base and enter a number.

Enter a number above…

— → —

Select a base and enter a number.

Enter a number above…

⚡ Quick Reference: Each Hex Digit = 4 Bits

HexBinaryHexBinary
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111
📍 MSB & LSB — Most & Least Significant Bit/Digit
Understanding significance: which end of a number carries the most weight?

🔵 Most Significant (MSD / MSB)

The leftmost non-zero digit/bit. Has the highest positional value.

🔴 Least Significant (LSD / LSB)

The rightmost digit/bit. Has the lowest positional value.

👁 Visual Explorer — Enter a Binary Number

📋 MSD & LSD Examples

NumberSystemMSD/MSBLSD/LSB
329Decimal39
1237.0Decimal17
58.32Decimal52
0.0975Decimal95
1001Binary1 (2³)1 (2⁰)
011.101Binary1 (2¹)1 (2⁻³)
AD239HexA9
23.08Octal28

📏 Rules to Remember

1 For whole numbers: leftmost non-zero = MSD/MSB, rightmost = LSD/LSB
2 For decimal fractions: leftmost non-zero before decimal = MSD/MSB
3 For decimal fractions: rightmost non-zero after decimal = LSD/LSB
4 Leading zeros (like 011.101) are ignored for MSB
5 The same rules work for Binary, Octal, Decimal, and Hexadecimal
💾 Data Storage Units
From a single bit to a Petabyte — understanding computer memory capacity.

📦 Unit Hierarchy (smallest → largest)

·Bit0 or 1
Nibble4 bits
Byte8 bits
📄Kilobyte (KB)1,024 bytes · ≈ ½ page of text
📚Megabyte (MB)1,024 KB · ≈ 500 pages
🎬Gigabyte (GB)1,024 MB · ≈ 500,000 pages
🗄️Terabyte (TB)1,024 GB · ≈ 500M pages
🌐Petabyte (PB)1,024 TB

🧮 Storage Unit Converter

Bits
Bytes
Kilobytes
Megabytes
Gigabytes

📊 Storage Devices & Their Capacities

DeviceCapacity RangeAccess SpeedCost/Unit
Register Memory1 KB⚡ Fastest💰 Highest
Cache Memory3 MB – 32 MB⚡ Very Fast💰 Very High
RAM1 GB – 64 GB🔶 FastMedium
ROM / Flash1 GB – 64 GB🔶 MediumMedium
Hard Disk100 GB – 6 TB🐢 Slow💚 Low
DVD4.7 GB – 9 GB🐢 Slow💚 Low
CD650 MB – 900 MB🐢 Slow💚 Low
Magnetic Tape1 TB – 185 TB🐢 Slowest💚 Lowest
🔡 Coding Systems in Computers
Binary codes are used to store text, numbers, images and sound inside a computer.
BCD
4

Binary Coded Decimal

4 bits per digit. Only decimal (0–9). 16 symbols max. Used in early computers.

ASCII
7

American Standard Code

7 bits → 128 characters. English text. Designed by ANSI. Still widely used.

EBCDIC
8

Extended BCD Interchange

8 bits → 256 characters. Used in IBM mainframe computers.

Unicode
16

Universal Code

16 bits → 65,536 symbols. Covers Sinhala, Tamil, Chinese, emojis & more.

⌨️ Live ASCII Explorer — Type anything below

Start typing to see ASCII codes…

🔢 BCD Encoder — Enter a decimal number

Enter a number above…

📊 Comparison Summary

SystemBitsCharactersUse Case
BCD416Decimal digits only (legacy)
ASCII7128English text & control chars
EBCDIC8256IBM mainframes
Unicode1665,536+All world languages, emojis

💡 Why Are Coding Systems Needed?

1Computers only understand 0 and 1 — everything must be converted to binary
2A coding system maps each character/symbol to a unique binary pattern
3ASCII was enough for English, but not for global languages → Unicode was created
4Images, sound, and video are also stored as binary patterns in memory
5Letter 'A' = 1000001 in ASCII (decimal 65) → stored as 7-bit binary code
🧠 Quick Quiz — Test Your Knowledge
10 questions covering all topics. Click an answer to check it immediately.
Question 0 / 10 answered
Score: 0 / 10
📝 Practice Questions & Answers
10 worked exam-style questions. Click "Show Answer" to reveal the full step-by-step solution.
QUESTION 01
Convert the decimal number 45₁₀ to binary.
Answer: 101101₂

Steps (divide by 2, read remainders bottom → top):
45 ÷ 2 = 22  remainder 1
22 ÷ 2 = 11  remainder 0
11 ÷ 2 = 5   remainder 1
5 ÷ 2 = 2    remainder 1
2 ÷ 2 = 1    remainder 0
1 ÷ 2 = 0    remainder 1
Reading bottom → top: 45₁₀ = 101101₂
QUESTION 02
Convert the binary number 11011₂ to decimal.
Answer: 27₁₀

Calculation (multiply each bit by its weighting factor):
11011₂ = (1×2⁴) + (1×2³) + (0×2²) + (1×2¹) + (1×2⁰)
       = 16 + 8 + 0 + 2 + 1
= 27₁₀
QUESTION 03
How many bits are in 2 Kilobytes?
Answer: 16,384 bits

Calculation:
2 KB = 2 × 1024 bytes = 2048 bytes
2048 bytes × 8 bits/byte
= 16,384 bits
QUESTION 04
Convert the hexadecimal number 2F₁₆ to binary.
Answer: 00101111₂

Steps (each hex digit → 4 binary bits):
2  → 0010
F  → 1111
Combining: 2F₁₆ = 00101111₂
QUESTION 05
What is the ASCII code for the letter 'A'?
Answer: 65₁₀ or 1000001₂

ASCII uses 7 bits to represent characters.
'A' = decimal 65 = binary 1000001
'a' = decimal 97 = binary 1100001  (difference of 32)
The uppercase-to-lowercase gap is always 32 in ASCII.
QUESTION 06
Convert octal number 157₈ to binary.
Answer: 001101111₂

Steps (each octal digit → 3 binary bits):
1₈ → 001
5₈ → 101
7₈ → 111
Combining: 157₈ = 001101111₂
QUESTION 07
Find the MSD and LSD of the number 3045.07₁₀
Answer:
MSD (Most Significant Digit) = 3  ← leftmost non-zero digit
LSD (Least Significant Digit) = 7  ← rightmost non-zero digit
Note: The trailing zero in 3045.07 — 7 is still the LSD since it is non-zero and rightmost.
QUESTION 08
Why do computers use the binary number system instead of decimal?
Answer:

Computers use electronic circuits that have two stable states:
ON (high voltage) → represented as 1
OFF (low voltage) → represented as 0

Binary digits 0 and 1 perfectly match these two states. It is far easier and more reliable to distinguish between two states than ten states (0–9) in an electronic circuit.
Any data (text, images, sound) can be stored as patterns of 0s and 1s.
QUESTION 09
Which coding system should be used to represent Sinhala text in a computer?
Answer: Unicode

Reason:
Unicode uses 16 bits → can represent 65,536 different characters
This covers Sinhala, Tamil, Chinese, Japanese, Arabic, emojis, and more
ASCII (7-bit) and EBCDIC (8-bit) can only represent English characters and basic symbols
∴ Unicode is the only system sufficient for all world languages.
QUESTION 10
Convert hexadecimal A5₁₆ to decimal.
Answer: 165₁₀

Calculation (multiply each digit by its weighting factor):
A5₁₆ = (A × 16¹) + (5 × 16⁰)
      = (10 × 16) + (5 × 1)
      = 160 + 5
= 165₁₀
💡 Study Tips for the Exam
Six key strategies to master Data Representation.
01
Practice Conversions Daily — The more you convert between number systems, the more automatic it becomes. Aim for at least 5 conversions each day.
02
Memorise Powers of 2 — Know 2⁰=1, 2¹=2, 2²=4, 2³=8, 2⁴=16, 2⁵=32, 2⁶=64, 2⁷=128, 2⁸=256 for fast binary conversions without calculation.
03
Use Grouping Rules — Binary → Octal: group 3 bits from right. Binary → Hex: group 4 bits from right. Always pad with leading zeros if needed.
04
Storage Units: 1 KB = 1024 Bytes — Not 1000! Computers use base 2, so each unit is 2¹⁰ = 1024 times the previous one.
05
ASCII Key Values — 'A' starts at 65, 'a' starts at 97. The gap between uppercase and lowercase is always 32. Digits '0'–'9' start at decimal 48.
06
Draw the Data Flow — For theory questions, sketch how data travels: Keyboard → Binary signal → RAM → CPU → Screen. Diagrams earn marks and help you remember.